from pydantic import BaseModel
from typing import Union, Optional, List

class UserData(BaseModel):
    """
    岗位信息表对应pydantic模型
    """
    user_id: Optional[int]
    user_name: Optional[str]
    nick_name: Optional[str]
    dept_id: Optional[int]
    phonenumber: Optional[str]
    email: Optional[str]
    sex: Optional[str]
    status: Optional[str]

    class Config:
        from_attributes = True


class ResetPassData(BaseModel):
    user_id: Optional[int]
    password: Optional[str]
    
    
class SetRoleData(BaseModel):
    user_id: Optional[int]
    roleIds: List[int]


class UserLogin(BaseModel):
    username: str
    password: str
